<script type="text/javascript" src="modules/ibdw/spywall/js/jmini.js" /></script>
<script>
    $jqspywall = jQuery.noConflict();
</script>
<script type="text/javascript" src="modules/ibdw/spywall/js/dialogo.js"></script>
<?php 
require_once( '../../../inc/header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' );  
    
$pagina = $_POST['pagina'];
 include BX_DIRECTORY_PATH_MODULES.'ibdw/spywall/config.php';
 
//Dichiarazione variabili
$varpage = strpos($pagina, '?');
if ($varpage==FALSE) { $pagina= $pagina.'?'; } else { $pagina= $pagina; };
$userid = (int)$_COOKIE['memberID'];
$mioid = $_POST['id'];

//FUNZIONI
//Connessione
$db = mysql_connect(DATABASE_HOST,DATABASE_USER,DATABASE_PASS);
mysql_query("SET NAMES 'utf8'");
 if ($db == FALSE)
 die ("errore di connessione");
 mysql_select_db(DATABASE_NAME,$db)
 or die ("errore selezione database");

include 'templatesw.php';
$varlink = strpos($pagina, 'member.php');
$varlinkhome = strpos($pagina, 'index.php');
$contanews=$_POST['inizio'];
$fine=$_POST['fine'];

//variabili limite per query
  $parami=$contanews;
  $paramf=$fine;
  $cont=$fine+1;

include 'masterquery.php';
  $result = mysql_query($query,$db) or die(mysql_error());
  $contazioni = mysql_num_rows($result);

$titolocommenti = _t('_ibdw_spywall_comment_title');
$titolocommenti_2 = _t('_ibdw_spywall_comment_title_first');
$idn = 0;
$provavariabile = "YES";
$GLOBAL['ultimoid'] = $_POST['ultimoid'];
include 'basecore.php';
include 'controllo.php';
       if ($contazioni>$limite) {   
	     echo '<div id="altro">';
       echo '<a href="javascript:altrenews('.$contanews.','.$limite.',\' '.$pagina.' \','.$mioid.','.$GLOBAL['ultimoid'].');" class="primoaltre"><b>'._t('_ibdw_spywall_altrenews').'</b></a>';   
       echo '</div>';
	   }
?>